package com.qh.yyxt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qh.yyxt.entity.Flag;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface FlagMapper extends BaseMapper<Flag>
{
    //添加
    public int addFlag(Flag flag);
    //修改
    public int updateInfoById(Integer id, Date passtime,String approver,Date returntime,String state);
    //update EndTime和State
    public int updateEndTime(Integer id,Date endTime);
    //根据id查找
    public Flag findById(Integer id);
    //根据state查找
    public List<Flag>findByState(String state);
    //查找
    public List<Flag>findAll();
    //根据用户id查找
    public List<Flag>findByUid(Integer uid);
    //根据fid 和  uid查询
    public String findByIdAndUid(Integer id,Integer uid);
    //获取两种state的
    public List<Flag>findByTwoState(String state1,String state2);
}
